/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sahd.logic.mail;

import beans.EmailBean;
import javax.jws.WebMethod;
import javax.jws.WebService;

/**
 *
 * @author Administrator
 */
@WebService()
public class EmailManager {

    private SenderEmailManager senderEmailManager;

    private void setSenderEmailManager(EmailBean emailBean){
        senderEmailManager =new SenderEmailManager(emailBean);
    }

    EmailManager(){
        senderEmailManager=null;        
    }


    @WebMethod(operationName = "sendMail")
    public boolean sendMail(EmailBean emailBean) {
        this.setSenderEmailManager(emailBean);
        senderEmailManager.sendEmail();
        return false;
    }

}
